package io.renren.modules.lanling.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.lanling.dao.InvoiceDao;
import io.renren.modules.lanling.entity.InvoiceEntity;
import io.renren.modules.lanling.service.InvoiceService;


@Service("invoiceService")
public class InvoiceServiceImpl extends ServiceImpl <InvoiceDao, InvoiceEntity> implements InvoiceService {

    @Override
    public PageUtils queryPage(Map <String, Object> params) {
        Query query = new Query( params );
        List<InvoiceEntity> examEntityList = this.baseMapper.queryList( query );
        Integer total = this.baseMapper.queryTotal( query );
        return new PageUtils( examEntityList, total, query.getLimit(), query.getCurrPage() );
    }

    @Override
    public InvoiceEntity queryObject(Integer id) {
        return this.baseMapper.queryObject( id );
    }
    @Override
    public Boolean update(InvoiceEntity invoiceEntity) {
        return this.baseMapper.update( invoiceEntity );
    }
}